projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cd1a4a
)
flattenlistmodel: Do proper check
author
Benjamin Otte
<otte@redhat.com>
Wed, 15 May 2019 20:18:56 +0000
(22:18 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Wed, 15 May 2019 21:39:37 +0000
(23:39 +0200)
If we want the model items to be listmodels, we don't need to do a ==
comparison. We need to do g_type_is_a(). Implementations of listmodels
are obviously fine.
gtk/gtkflattenlistmodel.c
patch
|
blob
|
history
diff --git
a/gtk/gtkflattenlistmodel.c
b/gtk/gtkflattenlistmodel.c
index 614493e28f9148b2657bed22bd2b8f9eabc24fe2..e33a47a30b7c4e0a3edb84aed80fce8b56abfdd8 100644
(file)
--- a/
gtk/gtkflattenlistmodel.c
+++ b/
gtk/gtkflattenlistmodel.c
@@
-486,7
+486,7
@@
gtk_flatten_list_model_set_model (GtkFlattenListModel *self,
g_return_if_fail (model == NULL || G_IS_LIST_MODEL (model));
if (model)
{
- g_return_if_fail (g_
list_model_get_item_type (model) == G_TYPE_LIST_MODEL
);
+ g_return_if_fail (g_
type_is_a (g_list_model_get_item_type (model), G_TYPE_LIST_MODEL)
);
}
if (self->model == model)